async function ag(url,param,token){

    var request = {};
    if(token != null && token != ''){
        var tk = localStorage.getItem(token);
        request.headers[token]= tk;
    }

    request.params = param;

    var info = {};
    await axios.get(url,request).then(e =>{
        info = e;
        if(info.headers[token] != null && info.headers[token] != ''){
            localStorage.setItem(token,info.headers[token]);
        }

    });
    return info.data;
}

async function ajaxPost1(url,param){
    var info = null;
    var obj = new URLSearchParams();
    for(field in param){
        obj.append(field,param[field]);
    }

    await axios.post(url,obj).then(e =>{
        info = e.data;
    });
    return info;
}
